package com.example.smartcity.ui.more

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.ViewModel
import com.example.smartcity.logic.Repository
import com.example.smartcity.logic.model.More
import com.example.smartcity.logic.net_work.Response

class moreViewModel : ViewModel() {
    private val moreData = MutableLiveData<String>()

    val moreList = ArrayList<More.Rows>()

    val moreLiveData = Transformations.switchMap(moreData){query ->
        Repository.getMore(query)
    }

    fun more(test: String){
        moreData.value = test
    }
}